package com.ice.work.moment.facade.crawler.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.honeybee.cloud.framework.common.mapper.BaseCovertMapper;
import com.honeybee.cloud.framework.common.page.Page;
import com.ice.work.moment.facade.crawler.dto.ShareDTO;
import com.ice.work.moment.facade.crawler.model.Share;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.Collection;
import java.util.List;

/**
 * @Description ShareConvertMapper
 * @Author DELL
 * @Create 2019-01-09
 * @Since 1.0.0
 */
@Mapper
@SuppressWarnings("all")
public interface ShareConvertMapper extends BaseCovertMapper {
    ShareConvertMapper INSTANCE = Mappers.getMapper(ShareConvertMapper.class);

    /**
     * to dto
     * @param share
     * @return
     */
    ShareDTO toDTO(Share share);
    /**
     * to dtos
     * @param shares
     * @return
     */
    List<ShareDTO> toDTO(Collection<Share> shares);

    Page<ShareDTO> toDTO(IPage<Share> from);
}
